package com.wicket.okrframework.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrframework.base.service.*;
import com.wicket.okrframework.base.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.common.*;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import com.wicket.okrframework.biz.service.nb.NbPostType;
import com.wicket.okrframework.common.exception.BizException;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import com.wicket.okrframework.common.util.RedisUtil;
import com.wicket.okrframework.dal.po.mbg.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import com.wicket.okrframework.common.exception.Assert;
import cn.hutool.core.collection.CollectionUtil;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class PostTypeServiceImpl
        implements com.wicket.okrframework.biz.service.PostTypeService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MGradeScopeService mGradeScopeService;
    @Resource
    private MAssistBehaviorCurrentStepService mAssistBehaviorCurrentStepService;
    @Resource
    private NbPostType nbPostType;
    @Resource
    private MPositionGradeService mPositionGradeService;
    @Resource
    private MBatchService mBatchService;
    @Resource
    private MStatusCheckItemService mStatusCheckItemService;
    @Resource
    private MStationTypeService mStationTypeService;
    @Resource
    private MInductionRecordService mInductionRecordService;
    @Resource
    private MUserinfoService mUserinfoService;
    @Resource
    private MStructureStationGradeService mStructureStationGradeService;

    /**
   * D1-3批量修改岗位类型等级范围[1298]
   * gen by moon at 10/2/2022, 12:02:20 AM
   */
  @Trace(operationName = "D1-3批量修改岗位类型等级范围")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchUpdateGradeScopeRespDto batchUpdateGradeScope(BatchUpdateGradeScopeReqDto reqDto){
    
      
      //步骤0: 1-3-01查询等级范围列表 - queryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  queryGradeScopeListReq.setTypeCode("JOB_TYPE");//sourceId:54675_1
queryGradeScopeListReq.setIsArchive("FALSE");//sourceId:54679_1
if(reqDto!=null){
      queryGradeScopeListReq.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:54676_1
    }
  
    /*1-3-01查询等级范围列表[127]   */
    Assert.isNull(queryGradeScopeListReq.getTypeCode(),"D1-3批量修改岗位类型等级范围-1-3-01查询等级范围列表-归属对象类型编码不能为空",false);
Assert.isNull(queryGradeScopeListReq.getEntityId(),"D1-3批量修改岗位类型等级范围-1-3-01查询等级范围列表-归属对象实例ID不能为空",false);
Assert.isNull(queryGradeScopeListReq.getIsArchive(),"D1-3批量修改岗位类型等级范围-1-3-01查询等级范围列表-是否存档不能为空",false);
      listGradeScope = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      
    
//步骤1: M-查询岗位类型等级范围数据分类列表（特殊方法） - queryGradeScopeDataClassList
     //ModelCode: dataAucClassification
        QueryGradeScopeDataClassListRespDto dataAucClassificationRes = null;
    if(listGradeScope !=null&& listGradeScope.size()>0 ){
          QueryGradeScopeDataClassListReqDto dataAucClassificationReq=new QueryGradeScopeDataClassListReqDto();
  dataAucClassificationReq.setGradeScopeDataList(listGradeScope.stream().map(item -> {
        GradeScopeDataDto elm =BeanUtil.toBean(item, GradeScopeDataDto.class);
        //elm.setStationGradeId();//CLASSIFICATION_ID  TODO ruizhe dong
        
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:54701_1
if(reqDto!=null){
      dataAucClassificationReq.setOrgGradeScopeList(//objList-to-objLists
        reqDto.getPostGradesList().stream().map(item -> {
      OrgGradeScopeDto elm = new OrgGradeScopeDto();
      if(item!=null){
      elm.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:29979_2
elm.setStationGradeName(item.getStationGradeName());//SimpleFieldAssign//sourceId:30101_2
elm.setStationGradeId(item.getStationGradeId());//SimpleFieldAssign//sourceId:29977_2
elm.setOrderNumber(item.getOrderNumber());//SimpleFieldAssign//sourceId:29980_2
elm.setBatchId(reqDto.getBatchId());//SimpleFieldAssign//sourceId:29982_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:54890_1
    }
  
    /*M-查询岗位类型等级范围数据分类列表（特殊方法）[1800]  入参两个数据集，出参三个数据集，分别对应：新增数据集、删除数据集、存档数据集 */
    
      dataAucClassificationRes = nbPostType.queryGradeScopeDataClassList(dataAucClassificationReq);
      
      
      
           }
    
//步骤2: 1-3-02批量新增等级范围 - batchAddGradeScope
     boolean bOOLEAN ;
    List<GradeScope> listGradeScope_2=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listGradeScope_2 = dataAucClassificationRes.getNewOrgGradeScopeList().stream().map(item -> {
        GradeScope elm =BeanUtil.toBean(item, GradeScope.class);
        elm.setTypeCode("JOB_TYPE");
        
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:54778_1
    }
  
    /*1-3-02批量新增等级范围[1801]   */
    
      bOOLEAN = mGradeScopeService.batchAddGradeScope(listGradeScope_2);
      
      
      
    
//步骤3: 1-3-01批量删除等级范围 - batchDeleteGradeScope
     boolean bOOLEAN_2 ;
    List<String> listString=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listString = dataAucClassificationRes.getDelOrgGradeScopeList().stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:55228_1
    }
  
    /*1-3-01批量删除等级范围[1802]   */
    
      bOOLEAN_2 = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
      
    
//步骤4: 1-3-02批量修改等级范围 - batchUpdateGradeScope
     boolean bOOLEAN_3 ;
    List<GradeScope> listGradeScope_3=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listGradeScope_3 = dataAucClassificationRes.getArcOrgGradeScopeList().stream().map(item -> {
        GradeScope elm =BeanUtil.toBean(item, GradeScope.class);
        elm.setSubjectLifeCycle("EDITING");
elm.setArchivngType("TOBE_ARCHIVING");
elm.setIsEditing("TRUE");
elm.setIsUpdate("TRUE");
elm.setUpdateStatus("ARCHIVE");
        
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:55232_1
    }
  
    /*1-3-02批量修改等级范围（想存档）[1296]   */
    
      bOOLEAN_3 = mGradeScopeService.batchUpdateGradeScope(listGradeScope_3);
      
      
      
    
//步骤5: 1-3-02批量修改等级范围 - batchUpdateGradeScope
     boolean bOOLEAN_4 ;
    List<GradeScope> listGradeScope_4=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listGradeScope_4 = dataAucClassificationRes.getUndoArcOrgGradeScopeList().stream().map(item -> {
        GradeScope elm =BeanUtil.toBean(item, GradeScope.class);
        elm.setSubjectLifeCycle("EDITING");
elm.setArchivngType("NOT_ARCHIVE");
elm.setIsArchive("FALSE");
elm.setIsEditing("TRUE");
elm.setIsUpdate("TRUE");
elm.setUpdateStatus("REVISION");
        
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56753_1
    }
  
    /*1-3-02批量修改等级范围（撤销存档）[1296]   */
    
      bOOLEAN_4 = mGradeScopeService.batchUpdateGradeScope(listGradeScope_4);
      
      
      
    
//步骤6: 1-1-18修改底层框架服务内容当前行为步骤	 - updateContCurrentBstep
     boolean bOOLEAN_5 ;
    AssistBehaviorCurrentStep assistBehaviorCurrentStep=new AssistBehaviorCurrentStep();
  assistBehaviorCurrentStep.setStepObj("OMS_ORG_STATION_TYPE");//sourceId:56656_1
if(reqDto!=null){
      assistBehaviorCurrentStep.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:56653_1
assistBehaviorCurrentStep.setStepNameId(reqDto.getStepNameId());//SimpleFieldAssign//sourceId:56654_1
    }
  
    /*1-1-18修改底层框架服务内容当前行为步骤	[485]   */
    
      bOOLEAN_5 = mAssistBehaviorCurrentStepService.updateContCurrentBstep(assistBehaviorCurrentStep);
      
      
      
    
BatchUpdateGradeScopeRespDto retData = new BatchUpdateGradeScopeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3批量删除等级范围[1860]
   * gen by moon at 8/10/2022, 3:20:55 AM
   */
  @Trace(operationName = "D1-3批量删除等级范围")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchDeleteGradeScopeRespDto batchDeleteGradeScope(BatchDeleteGradeScopeReqDto reqDto){
    
      
      //步骤0: 1-3-01批量删除等级范围 - batchDeleteGradeScope
     boolean bOOLEAN ;
    List<String> listString=new ArrayList<>();
  if(reqDto!=null){
      listString=reqDto.getOrgGradeScopeList();;//sourceId:56747_1
    }
  
    /*1-3-01批量删除等级范围[1802]   */
    
      bOOLEAN = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
    
BatchDeleteGradeScopeRespDto retData = new BatchDeleteGradeScopeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3批量查询等级范围列表[1829]
   * gen by moon at 10/2/2022, 1:36:30 AM
   */
  @Trace(operationName = "D1-3批量查询等级范围列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchQueryGradeScopeRespDto batchQueryGradeScope(BatchQueryGradeScopeReqDto reqDto){
    
      
      List<GradeScope> listGradeScope_1 =new ArrayList<>();
//步骤0: 1-3-01批量查询等级范围列表 - batchQueryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  if(reqDto!=null){
      //list-field-assign
    batchQueryGradeScopeListReq.setOrgGradeScopeList(reqDto.getOrgGradeScopeList());//sourceId:56332_1
batchQueryGradeScopeListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:56333_1
batchQueryGradeScopeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:56334_1
batchQueryGradeScopeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:56335_1
batchQueryGradeScopeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:56336_1
batchQueryGradeScopeListReq.setBatchStartTime(reqDto.getBatchStartTime());//SimpleFieldAssign//sourceId:56337_1
batchQueryGradeScopeListReq.setBatchEndTime(reqDto.getBatchEndTime());//SimpleFieldAssign//sourceId:56338_1
batchQueryGradeScopeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:56339_1
batchQueryGradeScopeListReq.setUpdateStatus(reqDto.getUpdateStatus());//SimpleFieldAssign//sourceId:56340_1
batchQueryGradeScopeListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:56341_1
    }
  
    /*1-3-01批量查询等级范围列表[1483]   */
    
      listGradeScope = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      listGradeScope_1 = listGradeScope;
    
BatchQueryGradeScopeRespDto retData = new BatchQueryGradeScopeRespDto();
  retData.setOrgGradeScopeList(listGradeScope_1.stream().map(item -> BeanUtil.toBean(item, OrgGradeScopeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:56352_1
  

  
  
return retData;
  }

    /**
   * D1-3删除职务级别[1822]
   * gen by moon at 10/2/2022, 1:25:53 AM
   */
  @Trace(operationName = "D1-3删除职务级别")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeletePositionGradeRespDto deletePositionGrade(DeletePositionGradeReqDto reqDto){
    
      
      //步骤0: 1-3-03删除职务级别 - deletePositionGrade
     boolean bOOLEAN ;
    String string=new String();
  if(reqDto!=null){
      string=reqDto.getPositionGradeId();;//SimpleFieldAssign//sourceId:55935_1
    }
  
    /*1-3-03删除职务级别[135]   */
    Assert.isNull(string,"D1-3删除职务级别-1-3-03删除职务级别-职务级别ID不能为空",false);
      bOOLEAN = mPositionGradeService.deletePositionGrade(string);
      
      
      
    
//步骤1: 1-3-01查询等级范围列表 - queryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  queryGradeScopeListReq.setTypeCode("JOB_LEVEL");//sourceId:55940_1
queryGradeScopeListReq.setSubjectLifeCycle("EDITING");//sourceId:55942_1
if(reqDto!=null){
      queryGradeScopeListReq.setEntityId(reqDto.getPositionGradeId());//SimpleFieldAssign//sourceId:55941_1
    }
  
    /*1-3-01查询等级范围列表[127]   */
    
      listGradeScope = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      
    
//步骤2: 1-3-01批量删除等级范围 - batchDeleteGradeScope
     boolean bOOLEAN_1 ;
    if(listGradeScope !=null&& listGradeScope.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listGradeScope.stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:55948_1
  
    /*1-3-01批量删除等级范围[1802]   */
    
      bOOLEAN_1 = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
      
           }
    
DeletePositionGradeRespDto retData = new DeletePositionGradeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3修订岗位类型[1818]
   * gen by moon at 10/2/2022, 1:16:17 AM
   */
  @Trace(operationName = "D1-3修订岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ReviseStationTypeRespDto reviseStationType(ReviseStationTypeReqDto reqDto){
    
      
      String string_1 =null;
//步骤0: 1-1-01新增底层框架服务批次 - addBaseBatch
     String string = null;
    Batch batch=new Batch();
  batch.setPurposeTypeCode("STATION_TYPE");//sourceId:55836_1
batch.setIsFirst("FALSE");//sourceId:55841_1
if(reqDto!=null){
      batch.setAscriptionObjectId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:55837_1
    }
  
    /*1-1-01新增底层框架服务批次[41]   */
    Assert.isNull(batch.getPurposeTypeCode(),"D1-3修订岗位类型-1-1-01新增底层框架服务批次-用途类型编码不能为空",false);
Assert.isNull(batch.getAscriptionObjectId(),"D1-3修订岗位类型-1-1-01新增底层框架服务批次-归属对象ID不能为空",false);
Assert.isNull(batch.getIsFirst(),"D1-3修订岗位类型-1-1-01新增底层框架服务批次-是否首次批次不能为空",false);
      string = mBatchService.addBaseBatch(batch);
      
      
      string_1 = string;
    
//步骤1: 1-1-22修改状态校验项	 - updateCheckItemStat
     boolean bOOLEAN ;
    StatusCheckItem statusCheckItem=new StatusCheckItem();
  statusCheckItem.setObjectTypeCode("ORG_CHECK");//sourceId:55845_1
statusCheckItem.setIsComplete("FALSE");//sourceId:55847_1
if(reqDto!=null){
      statusCheckItem.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:55846_1
    }
  
    /*1-1-22修改状态校验项	[325]   */
    Assert.isNull(statusCheckItem.getObjectTypeCode(),"D1-3修订岗位类型-1-1-22修改状态校验项	-内容对象类型编码不能为空",false);
Assert.isNull(statusCheckItem.getEntityId(),"D1-3修订岗位类型-1-1-22修改状态校验项	-内容对象实例ID不能为空",false);
Assert.isNull(statusCheckItem.getIsComplete(),"D1-3修订岗位类型-1-1-22修改状态校验项	-是否已完成不能为空",false);
      bOOLEAN = mStatusCheckItemService.updateCheckItemStat(statusCheckItem);
      
      
      
    
//步骤2: 1-1-18查询底层框架服务内容当前行为步骤 - queryContCurrentBstepDetail
     AssistBehaviorCurrentStep assistBehaviorCurrentStep = null;
    QueryContCurrentBstepDetailReq queryContCurrentBstepDetailReq=new QueryContCurrentBstepDetailReq();
  if(reqDto!=null){
      queryContCurrentBstepDetailReq.setEntityId(reqDto.getAscriptionObjectId());//SimpleFieldAssign//sourceId:56035_1
    }
  
    /*1-1-18查询底层框架服务内容当前行为步骤[1825]   */
    Assert.isNull(queryContCurrentBstepDetailReq.getEntityId(),"D1-3修订岗位类型-1-1-18查询底层框架服务内容当前行为步骤-步骤内容实例ID不能为空",false);
      assistBehaviorCurrentStep = mAssistBehaviorCurrentStepService.queryContCurrentBstepDetail(queryContCurrentBstepDetailReq);
      
      
      
    
//步骤3: 1-1-18修改底层框架服务内容当前行为步骤	 - updateContCurrentBstep
     boolean bOOLEAN_1 ;
    if(assistBehaviorCurrentStep !=null){
          AssistBehaviorCurrentStep assistBehaviorCurrentStep_2=new AssistBehaviorCurrentStep();
  if(assistBehaviorCurrentStep!=null){
      assistBehaviorCurrentStep_2.setBehaviorCurrentStepId(assistBehaviorCurrentStep.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:56001_1
    }
if(reqDto!=null){
      assistBehaviorCurrentStep_2.setStepNameId(reqDto.getStepNameId());//SimpleFieldAssign//sourceId:56004_1
    }
  
    /*1-1-18修改底层框架服务内容当前行为步骤	[485]   */
    Assert.isNull(assistBehaviorCurrentStep_2.getBehaviorCurrentStepId(),"D1-3修订岗位类型-1-1-18修改底层框架服务内容当前行为步骤	-内容当前行为步骤ID不能为空",false);
Assert.isNull(assistBehaviorCurrentStep_2.getStepNameId(),"D1-3修订岗位类型-1-1-18修改底层框架服务内容当前行为步骤	-当前步骤ID不能为空",false);
      bOOLEAN_1 = mAssistBehaviorCurrentStepService.updateContCurrentBstep(assistBehaviorCurrentStep_2);
      
      
      
           }
    
ReviseStationTypeRespDto retData = new ReviseStationTypeRespDto();
  if(string_1!=null){
      retData.setBatchId(string_1);//SimpleFieldAssign//sourceId:55988_1
    }
  

  
  
return retData;
  }

    /**
   * D1-3查询职务级别列表[1817]
   * gen by moon at 10/2/2022, 1:15:48 AM
   */
  @Trace(operationName = "D1-3查询职务级别列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPositionGradeListRespDto queryPositionGradeList(QueryPositionGradeListReqDto reqDto){
    
      
      List<PositionGrade> listPositionGrade_1 =new ArrayList<>();
//步骤0: 1-3-03查询职务级别列表 - queryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  if(reqDto!=null){
      queryPositionGradeListReq.setPositionGradeId(reqDto.getPositionGradeId());//SimpleFieldAssign//sourceId:55797_1
queryPositionGradeListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55785_1
queryPositionGradeListReq.setPositionGradeNumber(reqDto.getPositionGradeNumber());//SimpleFieldAssign//sourceId:55798_1
queryPositionGradeListReq.setPositionGradeName(reqDto.getPositionGradeName());//SimpleFieldAssign//sourceId:55786_1
queryPositionGradeListReq.setIsSetGrade(reqDto.getIsSetGrade());//SimpleFieldAssign//sourceId:55800_1
queryPositionGradeListReq.setBatchId(reqDto.getBatchId());//SimpleFieldAssign//sourceId:55790_1
queryPositionGradeListReq.setBatchStartTime(reqDto.getBatchStartTime());//SimpleFieldAssign//sourceId:55787_1
queryPositionGradeListReq.setBatchEndTime(reqDto.getBatchEndTime());//SimpleFieldAssign//sourceId:55788_1
queryPositionGradeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:55789_1
queryPositionGradeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:55792_1
queryPositionGradeListReq.setArchivngType(reqDto.getArchivngType());//SimpleFieldAssign//sourceId:55793_1
queryPositionGradeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:55794_1
queryPositionGradeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:55795_1
queryPositionGradeListReq.setUpdateStatus(reqDto.getUpdateStatus());//SimpleFieldAssign//sourceId:55796_1
queryPositionGradeListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:55791_1
queryPositionGradeListReq.setAppId(reqDto.getAppId());//SimpleFieldAssign//sourceId:55799_1
    }
  
    /*1-3-03查询职务级别列表[137]   */
    
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      listPositionGrade_1 = listPositionGrade;
    
QueryPositionGradeListRespDto retData = new QueryPositionGradeListRespDto();
  retData.setOrgPositionGradeList(listPositionGrade_1.stream().map(item -> BeanUtil.toBean(item, OrgPositionGradeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:55802_1
  

  
  
return retData;
  }

    /**
   * D1-3新增职务级别[1816]
   * gen by moon at 10/2/2022, 1:06:03 AM
   */
  @Trace(operationName = "D1-3新增职务级别")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public AddPositionGradeRespDto addPositionGrade(AddPositionGradeReqDto reqDto){
    
      
      String string_1 =null;
//步骤0: 1-3-03新增职务级别 - addPositionGrade
     String string = null;
    PositionGrade positionGrade=new PositionGrade();
  if(reqDto!=null){
      positionGrade.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55747_1
positionGrade.setPositionGradeNumber(reqDto.getPositionGradeNumber());//SimpleFieldAssign//sourceId:55748_1
positionGrade.setPositionGradeName(reqDto.getPositionGradeName());//SimpleFieldAssign//sourceId:55749_1
positionGrade.setIsSetGrade(reqDto.getIsSetGrade());//SimpleFieldAssign//sourceId:55750_1
positionGrade.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:55751_1
positionGrade.setBatchId(reqDto.getBatchId());//SimpleFieldAssign//sourceId:55752_1
    }
  
    /*1-3-03新增职务级别[133]   */
    Assert.isNull(positionGrade.getStationTypeId(),"D1-3新增职务级别-1-3-03新增职务级别-岗位类型ID不能为空",false);
Assert.isNull(positionGrade.getPositionGradeNumber(),"D1-3新增职务级别-1-3-03新增职务级别-职务级别编号不能为空",false);
Assert.isNull(positionGrade.getPositionGradeName(),"D1-3新增职务级别-1-3-03新增职务级别-职务级别名称不能为空",false);
Assert.isNull(positionGrade.getIsSetGrade(),"D1-3新增职务级别-1-3-03新增职务级别-是否设置等级范围不能为空",false);
Assert.isNull(positionGrade.getOrderNumber(),"D1-3新增职务级别-1-3-03新增职务级别-排序不能为空",false);
Assert.isNull(positionGrade.getBatchId(),"D1-3新增职务级别-1-3-03新增职务级别-批次ID不能为空",false);
      string = mPositionGradeService.addPositionGrade(positionGrade);
      
      
      string_1 = string;
    
AddPositionGradeRespDto retData = new AddPositionGradeRespDto();
  if(string_1!=null){
      retData.setPositionGradeId(string_1);//SimpleFieldAssign//sourceId:55759_1
    }
  

  
  
return retData;
  }

    /**
   * D1-3修改等级范围[1815]
   * gen by moon at 10/2/2022, 1:05:36 AM
   */
  @Trace(operationName = "D1-3修改等级范围")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public UpdateGradeScopeRespDto updateGradeScope(UpdateGradeScopeReqDto reqDto){
    
      
      //步骤0: 1-3-01修改等级范围 - updateGradeScope
     boolean bOOLEAN ;
    GradeScope gradeScope=new GradeScope();
  if(reqDto!=null){
      gradeScope.setGradeScopeId(reqDto.getGradeScopeId());//SimpleFieldAssign//sourceId:55637_1
gradeScope.setStationGradeAlias(reqDto.getStationGradeAlias());//SimpleFieldAssign//sourceId:55638_1
    }
  
    /*1-3-01修改等级范围[123]   */
    
      bOOLEAN = mGradeScopeService.updateGradeScope(gradeScope);
      
      
      
    
UpdateGradeScopeRespDto retData = new UpdateGradeScopeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3查询岗位体系[1799]
   * gen by moon at 10/2/2022, 12:45:18 AM
   */
  @Trace(operationName = "D1-3查询岗位体系")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryStationSystemListRespDto queryStationSystemList(QueryStationSystemListReqDto reqDto){
    
      
      List<PositionGrade> listPositionGrade_1 =new ArrayList<>();
List<GradeScope> listGradeScope_1 =new ArrayList<>();
List<GradeScope> listGradeScope_3 =new ArrayList<>();
//步骤0: 1-3-03查询职务级别列表 - queryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  queryPositionGradeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:54752_1
if(reqDto!=null){
      queryPositionGradeListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:54656_1
queryPositionGradeListReq.setBatchStartTime(reqDto.getBatchStartTime());//SimpleFieldAssign//sourceId:54658_1
queryPositionGradeListReq.setBatchEndTime(reqDto.getBatchEndTime());//SimpleFieldAssign//sourceId:54659_1
queryPositionGradeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:54657_1
queryPositionGradeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:54748_1
queryPositionGradeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:54749_1
queryPositionGradeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:54750_1
    }
  
    /*1-3-03查询职务级别列表[137]   */
    Assert.isNull(queryPositionGradeListReq.getStationTypeId(),"D1-3查询岗位体系-1-3-03查询职务级别列表-岗位类型ID不能为空",false);
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      listPositionGrade_1 = listPositionGrade;
    
//步骤1: 1-3-01批量查询等级范围列表 - batchQueryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  batchQueryGradeScopeListReq.setOrgGradeScopeList(listPositionGrade.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:54662_1
batchQueryGradeScopeListReq.setTypeCode("JOB_LEVEL");//sourceId:54663_1
batchQueryGradeScopeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:54768_1
if(reqDto!=null){
      batchQueryGradeScopeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:54664_1
batchQueryGradeScopeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:54665_1
batchQueryGradeScopeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:54763_1
batchQueryGradeScopeListReq.setBatchStartTime(reqDto.getBatchStartTime());//SimpleFieldAssign//sourceId:54764_1
batchQueryGradeScopeListReq.setBatchEndTime(reqDto.getBatchEndTime());//SimpleFieldAssign//sourceId:54765_1
batchQueryGradeScopeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:54766_1
    }
  
    /*1-3-01批量查询等级范围列表（查职级等级范围）[1483]   */
    Assert.isNull(batchQueryGradeScopeListReq.getTypeCode(),"D1-3查询岗位体系-1-3-01批量查询等级范围列表（查职级等级范围）-归属对象类型编码不能为空",false);
      listGradeScope = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      listGradeScope_1 = listGradeScope;
           }
    
//步骤2: 1-3-01批量查询等级范围列表 - batchQueryGradeScopeList
     List<GradeScope> listGradeScope_2 =new ArrayList<>();
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          BatchQueryGradeScopeListReq batchQueryGradeScopeListReq_1=new BatchQueryGradeScopeListReq();
  batchQueryGradeScopeListReq_1.setOrgGradeScopeList(listPositionGrade.stream().map(item->item.getStationTypeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:54669_1
batchQueryGradeScopeListReq_1.setTypeCode("JOB_TYPE");//sourceId:54670_1
batchQueryGradeScopeListReq_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:54762_1
if(reqDto!=null){
      batchQueryGradeScopeListReq_1.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:54671_1
batchQueryGradeScopeListReq_1.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:54672_1
batchQueryGradeScopeListReq_1.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:54673_1
batchQueryGradeScopeListReq_1.setBatchStartTime(reqDto.getBatchStartTime());//SimpleFieldAssign//sourceId:54758_1
batchQueryGradeScopeListReq_1.setBatchEndTime(reqDto.getBatchEndTime());//SimpleFieldAssign//sourceId:54759_1
batchQueryGradeScopeListReq_1.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:54760_1
    }
  
    /*1-3-01批量查询等级范围列表（查岗位类型等级范围关系编码）[1483]   */
    Assert.isNull(batchQueryGradeScopeListReq_1.getTypeCode(),"D1-3查询岗位体系-1-3-01批量查询等级范围列表（查岗位类型等级范围关系编码）-归属对象类型编码不能为空",false);
      listGradeScope_2 = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq_1);
      
      
      listGradeScope_3 = listGradeScope_2;
           }
    
QueryStationSystemListRespDto retData = new QueryStationSystemListRespDto();
  retData.setOrgPositionGradeList(listPositionGrade_1.stream().map(item -> BeanUtil.toBean(item, OrgPositionGradeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:54735_1
//数据集融合  MoreListToOneSource
        if(listGradeScope_1!= null && !CollectionUtil.isEmpty(listGradeScope_1) ){
          for (GradeScope gradeScope : listGradeScope_1) {
              OrgGradeScopeDto retElm = new OrgGradeScopeDto();
             retElm.setEntityId(gradeScope.getEntityId());//SimpleFieldAssign//sourceId:29880_2
retElm.setStationGradeAlias(gradeScope.getStationGradeAlias());//SimpleFieldAssign//sourceId:29879_2
              retData.getOrgGradeScopeList().add(retElm);
               if(listGradeScope_3!= null){
          for (GradeScope gradeScope_2 : listGradeScope_3) {
                if (gradeScope.getEntityId().equals(gradeScope_2.getEntityId())) {
                 retElm.setGradeScopeCode(gradeScope_2.getGradeScopeCode());//SimpleFieldAssign//sourceId:29878_2
retElm.setOrderNumber(gradeScope_2.getOrderNumber());//SimpleFieldAssign//sourceId:29898_2
                }
            }
          }
        
          }
        }//sourceId:54736_1
  

  
  
return retData;
  }

    /**
   * D1-3查询等级范围列表（边界）[1464]
   * gen by moon at 10/2/2022, 12:05:44 AM
   */
  @Trace(operationName = "D1-3查询等级范围列表（边界）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryGradeScopeListBorderRespDto queryGradeScopeListBorder(QueryGradeScopeListBorderReqDto reqDto){
    
      
      List<GradeScope> listGradeScope_1 =new ArrayList<>();
//步骤0: 1-3-01查询等级范围列表 - queryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  if(reqDto!=null){
      queryGradeScopeListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:36471_1
queryGradeScopeListReq.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:36472_1
queryGradeScopeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:36479_1
queryGradeScopeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:36475_1
queryGradeScopeListReq.setArchivngType(reqDto.getArchivngType());//SimpleFieldAssign//sourceId:36476_1
queryGradeScopeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:36477_1
queryGradeScopeListReq.setUpdateStatus(reqDto.getUpdateStatus());//SimpleFieldAssign//sourceId:36474_1
queryGradeScopeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:36478_1
    }
  
    /*1-3-01查询等级范围列表[127]   */
    
      listGradeScope = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      listGradeScope_1 = listGradeScope;
    
QueryGradeScopeListBorderRespDto retData = new QueryGradeScopeListBorderRespDto();
  retData.setOrgGradeScopeList(listGradeScope_1.stream().map(item -> BeanUtil.toBean(item, OrgGradeScopeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:36488_1
  

  
  
return retData;
  }

    /**
   * D1-3查询职务级别列表（边界）[1459]
   * gen by moon at 10/2/2022, 12:05:27 AM
   */
  @Trace(operationName = "D1-3查询职务级别列表（边界）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPositionGradeListBorderRespDto queryPositionGradeListBorder(QueryPositionGradeListBorderReqDto reqDto){
    
      
      List<PositionGrade> listPositionGrade_1 =new ArrayList<>();
//步骤0: 1-3-03查询职务级别列表 - queryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  if(reqDto!=null){
      queryPositionGradeListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:35797_1
queryPositionGradeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:40588_1
    }
  
    /*1-3-03查询职务级别列表[137]   */
    
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      listPositionGrade_1 = listPositionGrade;
    
QueryPositionGradeListBorderRespDto retData = new QueryPositionGradeListBorderRespDto();
  retData.setOrgPositionGradeList(listPositionGrade_1.stream().map(item -> BeanUtil.toBean(item, OrgPositionGradeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:35801_1
  

  
  
return retData;
  }

    /**
   * D1-3查询等级范围列表[946]
   * gen by moon at 10/2/2022, 7:51:34 AM
   */
  @Trace(operationName = "D1-3查询等级范围列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryGradeScopeListRespDto queryGradeScopeList(QueryGradeScopeListReqDto reqDto){
    
      
      List<GradeScope> listGradeScope_1 =new ArrayList<>();
//步骤0: 1-3-01查询等级范围列表 - queryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  if(reqDto!=null){
      queryGradeScopeListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:19057_1
queryGradeScopeListReq.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:19058_1
queryGradeScopeListReq.setUpdateStatus(reqDto.getUpdateStatus());//SimpleFieldAssign//sourceId:19063_1
queryGradeScopeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:36464_1
queryGradeScopeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:54629_1
queryGradeScopeListReq.setArchivngType(reqDto.getArchivngType());//SimpleFieldAssign//sourceId:55363_1
queryGradeScopeListReq.setIsEditing(reqDto.getIsEditing());//SimpleFieldAssign//sourceId:54630_1
queryGradeScopeListReq.setIsUpdate(reqDto.getIsUpdate());//SimpleFieldAssign//sourceId:55364_1
    }
  
    /*1-3-01查询等级范围列表[127]   */
    
      listGradeScope = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      listGradeScope_1 = listGradeScope;
    
QueryGradeScopeListRespDto retData = new QueryGradeScopeListRespDto();
  retData.setOrgGradeScopeList(listGradeScope_1.stream().map(item -> BeanUtil.toBean(item, OrgGradeScopeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:19121_1
  

  
  
return retData;
  }

    /**
   * D1-3删除岗位类型[676]
   * gen by moon at 10/2/2022, 7:46:06 AM
   */
  @Trace(operationName = "D1-3删除岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeleteStationTypeRespDto deleteStationType(DeleteStationTypeReqDto reqDto){
    
      
      //virtualUsage 1-3-04查询岗位类型详情  2116
      StationType stationType = null;
    QueryStationTypeDetailReq queryStationTypeDetailReq=new QueryStationTypeDetailReq();
  queryStationTypeDetailReq.setSubjectLifeCycle("EDITING");//sourceId:55348_1_2116
if(reqDto!=null){
      queryStationTypeDetailReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55337_1_2116
    }
  
    /*1-3-04查询岗位类型详情[141]   */
    Assert.isNull(queryStationTypeDetailReq.getStationTypeId(),"D1-3删除岗位类型-1-3-04查询岗位类型详情-岗位类型ID不能为空",false);
Assert.isNull(queryStationTypeDetailReq.getSubjectLifeCycle(),"D1-3删除岗位类型-1-3-04查询岗位类型详情-主体生命周期不能为空",false);
      stationType = mStationTypeService.queryStationTypeDetail(queryStationTypeDetailReq);
      
      
      
if((stationType!= null&& stationType.getStationTypeId() != null )) {
        //if(1-3-04查询岗位类型详情.岗位类型ID 不等于空 )  2117
        
List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  if(reqDto!=null){
      queryPositionGradeListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55293_1_2118
    }
  
    /*1-3-03查询职务级别列表[137]   */
    Assert.isNull(queryPositionGradeListReq.getStationTypeId(),"D1-3删除岗位类型-1-3-03查询职务级别列表-岗位类型ID不能为空",false);
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      
List<GradeScope> listGradeScope =new ArrayList<>();
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  batchQueryGradeScopeListReq.setOrgGradeScopeList(listPositionGrade.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:55311_1_2121
batchQueryGradeScopeListReq.setTypeCode("JOB_LEVEL");//sourceId:55312_1_2121
  
    /*1-3-01批量查询等级范围列表（查职级等级范围）[1483]   */
    Assert.isNull(batchQueryGradeScopeListReq.getTypeCode(),"D1-3删除岗位类型-1-3-01批量查询等级范围列表（查职级等级范围）-归属对象类型编码不能为空",false);
      listGradeScope = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      
           }
boolean bOOLEAN ;
    if(listGradeScope !=null&& listGradeScope.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listGradeScope.stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:55329_1_2122
  
    /*1-3-02批量删除等级范围（删职级等级范围）[1802]   */
    
      bOOLEAN = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
      
           }
boolean bOOLEAN_1 ;
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          List<String> listString_1=new ArrayList<>();
  listString_1 = listPositionGrade.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:55369_1_2123
  
    /*1-3-03批量删除职务级别[1813]   */
    
      bOOLEAN_1 = mPositionGradeService.batchDeletePositionGrade(listString_1);
      
      
      
           }
List<GradeScope> listGradeScope_2 =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  queryGradeScopeListReq.setTypeCode("JOB_TYPE");//sourceId:55284_1_2124
if(reqDto!=null){
      queryGradeScopeListReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55285_1_2124
    }
  
    /*1-3-01查询等级范围列表（查岗位类型等级范围）[127]   */
    Assert.isNull(queryGradeScopeListReq.getTypeCode(),"D1-3删除岗位类型-1-3-01查询等级范围列表（查岗位类型等级范围）-归属对象类型编码不能为空",false);
Assert.isNull(queryGradeScopeListReq.getEntityId(),"D1-3删除岗位类型-1-3-01查询等级范围列表（查岗位类型等级范围）-归属对象实例ID不能为空",false);
      listGradeScope_2 = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      
boolean bOOLEAN_2 ;
    if(listGradeScope_2 !=null&& listGradeScope_2.size()>0 ){
          List<String> listString_2=new ArrayList<>();
  listString_2 = listGradeScope_2.stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:55371_1_2125
  
    /*1-3-02批量删除等级范围（删岗位类型等级范围）[1802]   */
    
      bOOLEAN_2 = mGradeScopeService.batchDeleteGradeScope(listString_2);
      
      
      
           }
Batch batch = null;
    QueryBaseBatchDetailReq queryBaseBatchDetailReq=new QueryBaseBatchDetailReq();
  queryBaseBatchDetailReq.setPurposeTypeCode("STATION_TYPE");//sourceId:55414_1_2126
if(reqDto!=null){
      queryBaseBatchDetailReq.setAscriptionObjectId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55415_1_2126
    }
  
    /*1-1-01查询底层框架服务批次详情[44]   */
    Assert.isNull(queryBaseBatchDetailReq.getPurposeTypeCode(),"D1-3删除岗位类型-1-1-01查询底层框架服务批次详情-用途类型编码不能为空",false);
Assert.isNull(queryBaseBatchDetailReq.getAscriptionObjectId(),"D1-3删除岗位类型-1-1-01查询底层框架服务批次详情-归属对象ID不能为空",false);
      batch = mBatchService.queryBaseBatchDetail(queryBaseBatchDetailReq);
      
      
      
boolean bOOLEAN_3 ;
    if(batch !=null){
          String string=new String();
  if(batch!=null){
      string=batch.getBatchId();;//SimpleFieldAssign//sourceId:55437_1_2127
    }
  
    /*1-1-01删除底层框架服务批次	[43]   */
    Assert.isNull(string,"D1-3删除岗位类型-1-1-01删除底层框架服务批次	-批次ID不能为空",false);
      bOOLEAN_3 = mBatchService.deleteBaseBatch(string);
      
      
      
           }
StatusCheckItem statusCheckItem = null;
    QueryCheckItemStatDetailReq queryCheckItemStatDetailReq=new QueryCheckItemStatDetailReq();
  queryCheckItemStatDetailReq.setObjectTypeCode("STATION_TYPE");//sourceId:55419_1_2128
if(reqDto!=null){
      queryCheckItemStatDetailReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:55420_1_2128
    }
  
    /*1-1-22查询状态校验项详情[327]   */
    Assert.isNull(queryCheckItemStatDetailReq.getObjectTypeCode(),"D1-3删除岗位类型-1-1-22查询状态校验项详情-内容对象类型编码不能为空",false);
Assert.isNull(queryCheckItemStatDetailReq.getEntityId(),"D1-3删除岗位类型-1-1-22查询状态校验项详情-内容对象实例ID不能为空",false);
      statusCheckItem = mStatusCheckItemService.queryCheckItemStatDetail(queryCheckItemStatDetailReq);
      
      
      
boolean bOOLEAN_4 ;
    if(statusCheckItem !=null){
          DeleteCheckItemStatReq deleteCheckItemStatReq=new DeleteCheckItemStatReq();
  if(statusCheckItem!=null){
      deleteCheckItemStatReq.setStatusCheckItemId(statusCheckItem.getStatusCheckItemId());//SimpleFieldAssign//sourceId:55433_1_2129
    }
  
    /*1-1-22删除状态校验项[326]   */
    Assert.isNull(deleteCheckItemStatReq.getStatusCheckItemId(),"D1-3删除岗位类型-1-1-22删除状态校验项-状态校验项ID不能为空",false);
      bOOLEAN_4 = mStatusCheckItemService.deleteCheckItemStat(deleteCheckItemStatReq);
      
      
      
           }
AssistBehaviorCurrentStep assistBehaviorCurrentStep = null;
    QueryContCurrentBstepDetailReq queryContCurrentBstepDetailReq=new QueryContCurrentBstepDetailReq();
  queryContCurrentBstepDetailReq.setStepObj("OMS_ORG_STATION_TYPE");//sourceId:56468_1_2181
if(reqDto!=null){
      queryContCurrentBstepDetailReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56451_1_2181
    }
  
    /*1-1-18查询底层框架服务内容当前行为步骤[1825]   */
    Assert.isNull(queryContCurrentBstepDetailReq.getStepObj(),"D1-3删除岗位类型-1-1-18查询底层框架服务内容当前行为步骤-步骤使用对象表不能为空",false);
Assert.isNull(queryContCurrentBstepDetailReq.getEntityId(),"D1-3删除岗位类型-1-1-18查询底层框架服务内容当前行为步骤-步骤内容实例ID不能为空",false);
      assistBehaviorCurrentStep = mAssistBehaviorCurrentStepService.queryContCurrentBstepDetail(queryContCurrentBstepDetailReq);
      
      
      
boolean bOOLEAN_5 ;
    if(assistBehaviorCurrentStep !=null){
          String string_1=new String();
  if(assistBehaviorCurrentStep!=null){
      string_1=assistBehaviorCurrentStep.getBehaviorCurrentStepId();;//SimpleFieldAssign//sourceId:56456_1_2182
    }
  
    /*1-1-18删除底层框架服务内容当前行为步骤	[486]   */
    Assert.isNull(string_1,"D1-3删除岗位类型-1-1-18删除底层框架服务内容当前行为步骤	-内容当前行为步骤ID不能为空",false);
      bOOLEAN_5 = mAssistBehaviorCurrentStepService.deleteContCurrentBstep(string_1);
      
      
      
           }
boolean bOOLEAN_6 ;
    String string_2=new String();
  if(reqDto!=null){
      string_2=reqDto.getStationTypeId();;//SimpleFieldAssign//sourceId:11804_1_2183
    }
  
    /*1-3-04删除岗位类型[140]   */
    Assert.isNull(string_2,"D1-3删除岗位类型-1-3-04删除岗位类型-岗位类型ID不能为空",false);
      bOOLEAN_6 = mStationTypeService.deleteStationType(string_2);
      
      
      
//processBranchName:正常结束 ,processBranchId:2184
        
      }
else{
       //else  2186
      
//异常结束 2187
      throw new BizException("undefined","undefined",false);
    }
DeleteStationTypeRespDto retData = new DeleteStationTypeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3新增岗位类型[674]
   * gen by moon at 10/2/2022, 7:45:54 AM
   */
  @Trace(operationName = "D1-3新增岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public AddStationTypeRespDto addStationType(AddStationTypeReqDto reqDto){
    
      
      String string_1 =null;
String string_3 =null;
String string_5 =null;
String string_7 =null;
//步骤0: 1-3-04新增岗位类型 - addStationType
     String string = null;
    StationType stationType=new StationType();
  if(reqDto!=null){
      stationType.setStationTypeNumber(reqDto.getStationTypeNumber());//SimpleFieldAssign//sourceId:11972_1
stationType.setStationTypeName(reqDto.getStationTypeName());//SimpleFieldAssign//sourceId:11973_1
stationType.setStationTypeEnShort(reqDto.getStationTypeEnShort());//SimpleFieldAssign//sourceId:11974_1
stationType.setIsManagement(reqDto.getIsManagement());//SimpleFieldAssign//sourceId:11971_1
    }
  
    /*1-3-04新增岗位类型[138]   */
    Assert.isNull(stationType.getStationTypeNumber(),"D1-3新增岗位类型-1-3-04新增岗位类型-岗位类型编号不能为空",false);
Assert.isNull(stationType.getStationTypeName(),"D1-3新增岗位类型-1-3-04新增岗位类型-岗位类型名称不能为空",false);
Assert.isNull(stationType.getIsManagement(),"D1-3新增岗位类型-1-3-04新增岗位类型-是否管理岗不能为空",false);
      string = mStationTypeService.addStationType(stationType);
      
      
      string_1 = string;
    
//步骤1: 1-1-01新增底层框架服务批次 - addBaseBatch
     String string_2 = null;
    if(string !=null){
          Batch batch=new Batch();
  batch.setPurposeTypeCode("STATION_TYPE");//sourceId:55739_1
batch.setIsFirst("TRUE");//sourceId:55746_1
if(string!=null){
      batch.setAscriptionObjectId(string);//SimpleFieldAssign//sourceId:55740_1
    }
  
    /*1-1-01新增底层框架服务批次[41]   */
    Assert.isNull(batch.getPurposeTypeCode(),"D1-3新增岗位类型-1-1-01新增底层框架服务批次-用途类型编码不能为空",false);
Assert.isNull(batch.getAscriptionObjectId(),"D1-3新增岗位类型-1-1-01新增底层框架服务批次-归属对象ID不能为空",false);
Assert.isNull(batch.getIsFirst(),"D1-3新增岗位类型-1-1-01新增底层框架服务批次-是否首次批次不能为空",false);
      string_2 = mBatchService.addBaseBatch(batch);
      
      
      string_3 = string_2;
           }
    
//步骤2: 1-1-22新增状态校验项 - addCheckItemStat
     String string_4 = null;
    if(string !=null){
          StatusCheckItem statusCheckItem=new StatusCheckItem();
  statusCheckItem.setObjectTypeCode("STATION_TYPE");//sourceId:55775_1
if(string!=null){
      statusCheckItem.setEntityId(string);//SimpleFieldAssign//sourceId:55776_1
    }
  
    /*1-1-22新增状态校验项[324]   */
    Assert.isNull(statusCheckItem.getObjectTypeCode(),"D1-3新增岗位类型-1-1-22新增状态校验项-内容对象类型编码不能为空",false);
Assert.isNull(statusCheckItem.getEntityId(),"D1-3新增岗位类型-1-1-22新增状态校验项-内容对象实例ID不能为空",false);
      string_4 = mStatusCheckItemService.addCheckItemStat(statusCheckItem);
      
      
      string_5 = string_4;
           }
    
//步骤3: 1-1-18新增底层框架服务内容当前行为步骤 - addContCurrentBstep
     String string_6 = null;
    if(string !=null){
          AssistBehaviorCurrentStep assistBehaviorCurrentStep=new AssistBehaviorCurrentStep();
  assistBehaviorCurrentStep.setStepObj("OMS_ORG_STATION_TYPE");//sourceId:55865_1
if(string!=null){
      assistBehaviorCurrentStep.setEntityId(string);//SimpleFieldAssign//sourceId:55857_1
    }
if(reqDto!=null){
      assistBehaviorCurrentStep.setStepNameId(reqDto.getStepNameId());//SimpleFieldAssign//sourceId:55859_1
    }
  
    /*1-1-18新增底层框架服务内容当前行为步骤[483]   */
    Assert.isNull(assistBehaviorCurrentStep.getStepObj(),"D1-3新增岗位类型-1-1-18新增底层框架服务内容当前行为步骤-步骤使用对象表不能为空",false);
Assert.isNull(assistBehaviorCurrentStep.getEntityId(),"D1-3新增岗位类型-1-1-18新增底层框架服务内容当前行为步骤-步骤内容实例ID不能为空",false);
Assert.isNull(assistBehaviorCurrentStep.getStepNameId(),"D1-3新增岗位类型-1-1-18新增底层框架服务内容当前行为步骤-当前步骤ID不能为空",false);
      string_6 = mAssistBehaviorCurrentStepService.addContCurrentBstep(assistBehaviorCurrentStep);
      
      
      string_7 = string_6;
           }
    
AddStationTypeRespDto retData = new AddStationTypeRespDto();
  if(string_1!=null){
      retData.setStationTypeId(string_1);//SimpleFieldAssign//sourceId:12016_1
    }
if(string_3!=null){
      retData.setBatchId(string_3);//SimpleFieldAssign//sourceId:55778_1
    }
if(string_5!=null){
      retData.setStatusCheckItemId(string_5);//SimpleFieldAssign//sourceId:55779_1
    }
if(string_7!=null){
      retData.setBehaviorCurrentStepId(string_7);//SimpleFieldAssign//sourceId:55962_1
    }
  

  
  
return retData;
  }

    /**
   * D1-3修改岗位类型[672]
   * gen by moon at 10/2/2022, 7:45:42 AM
   */
  @Trace(operationName = "D1-3修改岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public UpdateStationTypeRespDto updateStationType(UpdateStationTypeReqDto reqDto){
    
      
      //步骤0: 1-3-04修改岗位类型 - updateStationType
     boolean bOOLEAN ;
    StationType stationType=new StationType();
  if(reqDto!=null){
      stationType.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:12360_1
stationType.setStationTypeName(reqDto.getStationTypeName());//SimpleFieldAssign//sourceId:12327_1
stationType.setStationTypeCode(reqDto.getStationTypeCode());//SimpleFieldAssign//sourceId:55681_1
stationType.setStationTypeNumber(reqDto.getStationTypeNumber());//SimpleFieldAssign//sourceId:12326_1
stationType.setStationTypeEnShort(reqDto.getStationTypeEnShort());//SimpleFieldAssign//sourceId:12328_1
stationType.setIsManagement(reqDto.getIsManagement());//SimpleFieldAssign//sourceId:12324_1
stationType.setRankOrderType(reqDto.getRankOrderType());//SimpleFieldAssign//sourceId:55682_1
stationType.setStationGradeRankType(reqDto.getStationGradeRankType());//SimpleFieldAssign//sourceId:55683_1
    }
  
    /*1-3-04修改岗位类型[139]   */
    Assert.isNull(stationType.getStationTypeId(),"D1-3修改岗位类型-1-3-04修改岗位类型-岗位类型ID不能为空",false);
      bOOLEAN = mStationTypeService.updateStationType(stationType);
      
      
      
    
UpdateStationTypeRespDto retData = new UpdateStationTypeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3查询岗位类型详情[671]
   * gen by moon at 10/2/2022, 7:45:30 AM
   */
  @Trace(operationName = "D1-3查询岗位类型详情")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryStationTypeDetailRespDto queryStationTypeDetail(QueryStationTypeDetailReqDto reqDto){
    
      
      StationType stationType_1 =null;
InductionRecord inductionRecord_1 =null;
Userinfo userinfo_1 =null;
//步骤0: 1-3-04查询岗位类型详情 - queryStationTypeDetail
     StationType stationType = null;
    QueryStationTypeDetailReq queryStationTypeDetailReq=new QueryStationTypeDetailReq();
  if(reqDto!=null){
      queryStationTypeDetailReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:11753_1
queryStationTypeDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:55272_1
queryStationTypeDetailReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:55273_1
    }
  
    /*1-3-04查询岗位类型详情[141]   */
    Assert.isNull(queryStationTypeDetailReq.getStationTypeId(),"D1-3查询岗位类型详情-1-3-04查询岗位类型详情-岗位类型ID不能为空",false);
      stationType = mStationTypeService.queryStationTypeDetail(queryStationTypeDetailReq);
      
      
      stationType_1 = stationType;
    
//步骤1: 1-3-13查询就职记录详情 - queryinductionRecordDetail
     InductionRecord inductionRecord = null;
    if(stationType !=null){
          QueryinductionRecordDetailReq queryinductionRecordDetailReq=new QueryinductionRecordDetailReq();
  if(stationType!=null){
      queryinductionRecordDetailReq.setInductionRecordId(stationType.getOperationInductionId());//SimpleFieldAssign//sourceId:54903_1
    }
  
    /*1-3-13查询就职记录详情[165]   */
    Assert.isNull(queryinductionRecordDetailReq.getInductionRecordId(),"D1-3查询岗位类型详情-1-3-13查询就职记录详情-就职记录ID不能为空",false);
      inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq);
      
      
      inductionRecord_1 = inductionRecord;
           }
    
//步骤2: 1-2-02查询个人资料详情 - queryUserinfoDetail
     Userinfo userinfo = null;
    if(inductionRecord !=null){
          QueryUserinfoDetailReq queryUserinfoDetailReq=new QueryUserinfoDetailReq();
  if(inductionRecord!=null){
      queryUserinfoDetailReq.setUserId(inductionRecord.getUserId());//SimpleFieldAssign//sourceId:54917_1
    }
  
    /*1-2-02查询个人资料详情[155]   */
    
      userinfo = mUserinfoService.queryUserinfoDetail(queryUserinfoDetailReq);
      
      
      userinfo_1 = userinfo;
           }
    
QueryStationTypeDetailRespDto retData = new QueryStationTypeDetailRespDto();
  if(stationType_1!=null){
      retData.setStationTypeId(stationType_1.getStationTypeId());//SimpleFieldAssign//sourceId:54921_1
retData.setStationTypeCode(stationType_1.getStationTypeCode());//SimpleFieldAssign//sourceId:54923_1
retData.setStationTypeNumber(stationType_1.getStationTypeNumber());//SimpleFieldAssign//sourceId:54929_1
retData.setStationTypeName(stationType_1.getStationTypeName());//SimpleFieldAssign//sourceId:54930_1
retData.setStationTypeEnShort(stationType_1.getStationTypeEnShort());//SimpleFieldAssign//sourceId:54932_1
retData.setRankOrderType(stationType_1.getRankOrderType());//SimpleFieldAssign//sourceId:54931_1
retData.setStationGradeRankType(stationType_1.getStationGradeRankType());//SimpleFieldAssign//sourceId:54973_1
retData.setIsManagement(stationType_1.getIsManagement());//SimpleFieldAssign//sourceId:54927_1
retData.setOrderNumber(stationType_1.getOrderNumber());//SimpleFieldAssign//sourceId:54933_1
retData.setIsArchive(stationType_1.getIsArchive());//SimpleFieldAssign//sourceId:55049_1
retData.setBatchId(stationType_1.getBatchId());//SimpleFieldAssign//sourceId:55050_1
retData.setOperationInductionId(stationType_1.getOperationInductionId());//SimpleFieldAssign//sourceId:54935_1
retData.setOperateTime(stationType_1.getOperateTime());//SimpleFieldAssign//sourceId:54936_1
    }
if(inductionRecord_1!=null){
      retData.setOriginalRoleMemberId(inductionRecord_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:54925_1
    }
if(userinfo_1!=null){
      retData.setUserId(userinfo_1.getUserId());//SimpleFieldAssign//sourceId:54922_1
retData.setUserFace(userinfo_1.getUserFace());//SimpleFieldAssign//sourceId:54928_1
retData.setIdCardName(userinfo_1.getIdCardName());//SimpleFieldAssign//sourceId:54924_1
retData.setNickName(userinfo_1.getNickName());//SimpleFieldAssign//sourceId:54926_1
    }
  

  
  
return retData;
  }

    /**
   * D1-3查询岗位类型列表（边界）[670]
   * gen by moon at 10/2/2022, 7:45:17 AM
   */
  @Trace(operationName = "D1-3查询岗位类型列表（边界）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryStationTypeListBorderRespDto queryStationTypeListBorder(QueryStationTypeListBorderReqDto reqDto){
    
      
      List<StationType> listStationType_1 =new ArrayList<>();
//步骤0: 1-3-04查询岗位类型列表 - queryStationTypeList
     List<StationType> listStationType =new ArrayList<>();
    QueryStationTypeListReq queryStationTypeListReq=new QueryStationTypeListReq();
  if(reqDto!=null){
      queryStationTypeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:46030_1
queryStationTypeListReq.setAchivngType(reqDto.getAchivngType());//SimpleFieldAssign//sourceId:46048_1
queryStationTypeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:46031_1
queryStationTypeListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:46032_1
    }
  
    /*1-3-04查询岗位类型列表[142]   */
    
      listStationType = mStationTypeService.queryStationTypeList(queryStationTypeListReq);
      
      
      listStationType_1 = listStationType;
    
QueryStationTypeListBorderRespDto retData = new QueryStationTypeListBorderRespDto();
  retData.setOrgStationTypeList(listStationType_1.stream().map(item -> BeanUtil.toBean(item, OrgStationTypeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:46038_1
  

  
  
return retData;
  }

    /**
   * D1-3查询岗位类型列表[1458]
   * gen by moon at 10/2/2022, 12:05:10 AM
   */
  @Trace(operationName = "D1-3查询岗位类型列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryStationTypeListRespDto queryStationTypeList(QueryStationTypeListReqDto reqDto){
    
      
      List<StationType> listStationType_1 =new ArrayList<>();
//步骤0: 1-3-04查询岗位类型列表 - queryStationTypeList
     List<StationType> listStationType =new ArrayList<>();
    QueryStationTypeListReq queryStationTypeListReq=new QueryStationTypeListReq();
  queryStationTypeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:54477_1
if(reqDto!=null){
      queryStationTypeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:40614_1
    }
  
    /*1-3-04查询岗位类型列表[142]   */
    Assert.isNull(queryStationTypeListReq.getIsArchive(),"D1-3查询岗位类型列表-1-3-04查询岗位类型列表-是否存档不能为空",false);
Assert.isNull(queryStationTypeListReq.getSpaceId(),"D1-3查询岗位类型列表-1-3-04查询岗位类型列表-创建于空间ID不能为空",false);
      listStationType = mStationTypeService.queryStationTypeList(queryStationTypeListReq);
      
      
      listStationType_1 = listStationType;
    
QueryStationTypeListRespDto retData = new QueryStationTypeListRespDto();
  retData.setOrgStationTypeList(listStationType_1.stream().map(item -> BeanUtil.toBean(item, OrgStationTypeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:54779_1
  

  
  
return retData;
  }

    /**
   * D1-3取消修订岗位类型[1826]
   * gen by moon at 10/2/2022, 1:36:03 AM
   */
  @Trace(operationName = "D1-3取消修订岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public UndoReviseStationTypeRespDto undoReviseStationType(UndoReviseStationTypeReqDto reqDto){
    
      
      //步骤0: 1-3-01查询等级范围列表 - queryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  queryGradeScopeListReq.setTypeCode("JOB_TYPE");//sourceId:56062_1
queryGradeScopeListReq.setUpdateStatus("NEW");//sourceId:56100_1
  
    /*1-3-01查询等级范围列表[127]   */
    Assert.isNull(queryGradeScopeListReq.getTypeCode(),"D1-3取消修订岗位类型-1-3-01查询等级范围列表-归属对象类型编码不能为空",false);
Assert.isNull(queryGradeScopeListReq.getEntityId(),"D1-3取消修订岗位类型-1-3-01查询等级范围列表-归属对象实例ID不能为空",false);
Assert.isNull(queryGradeScopeListReq.getUpdateStatus(),"D1-3取消修订岗位类型-1-3-01查询等级范围列表-批次下更新状态不能为空",false);
      listGradeScope = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      
    
//步骤1: 1-3-03查询职务级别列表 - queryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  
  
    /*1-3-03查询职务级别列表[137]   */
    
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      
    
//步骤2: 1-3-01批量查询等级范围列表 - batchQueryGradeScopeList
     List<GradeScope> listGradeScope_2 =new ArrayList<>();
    BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  
  
    /*1-3-01批量查询等级范围列表[1483]   */
    
      listGradeScope_2 = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      
    
UndoReviseStationTypeRespDto retData = new UndoReviseStationTypeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3修改职务级别[1823]
   * gen by moon at 10/2/2022, 1:26:20 AM
   */
  @Trace(operationName = "D1-3修改职务级别")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public UpdatePositionGradeRespDto updatePositionGrade(UpdatePositionGradeReqDto reqDto){
    
      
      //步骤0: 1-3-03修改职务级别 - updatePositionGrade
     boolean bOOLEAN ;
    PositionGrade positionGrade=new PositionGrade();
  if(reqDto!=null){
      positionGrade.setPositionGradeId(reqDto.getPositionGradeId());//SimpleFieldAssign//sourceId:55949_1
positionGrade.setPositionGradeNumber(reqDto.getPositionGradeNumber());//SimpleFieldAssign//sourceId:55951_1
positionGrade.setPositionGradeName(reqDto.getPositionGradeName());//SimpleFieldAssign//sourceId:55952_1
positionGrade.setIsSetGrade(reqDto.getIsSetGrade());//SimpleFieldAssign//sourceId:55970_1
positionGrade.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:55954_1
    }
  
    /*1-3-03修改职务级别[134]   */
    Assert.isNull(positionGrade.getPositionGradeId(),"D1-3修改职务级别-1-3-03修改职务级别-职务级别ID不能为空",false);
      bOOLEAN = mPositionGradeService.updatePositionGrade(positionGrade);
      
      
      
    
UpdatePositionGradeRespDto retData = new UpdatePositionGradeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3查询岗位等级列表[1794]
   * gen by moon at 10/2/2022, 12:35:46 AM
   */
  @Trace(operationName = "D1-3查询岗位等级列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPostGradesListRespDto queryPostGradesList(QueryPostGradesListReqDto reqDto){
    
      
      List<StructureStationGrade> listStructureStationGrade_1 =new ArrayList<>();
//步骤0: 1-3-02查询岗位等级列表 - queryPostGradesList
     List<StructureStationGrade> listStructureStationGrade =new ArrayList<>();
    QueryPostGradesListReq queryPostGradesListReq=new QueryPostGradesListReq();
  if(reqDto!=null){
      queryPostGradesListReq.setStationGradeName(reqDto.getStationGradeName());//SimpleFieldAssign//sourceId:54492_1
    }
  
    /*1-3-02查询岗位等级列表[132]   */
    
      listStructureStationGrade = mStructureStationGradeService.queryPostGradesList(queryPostGradesListReq);
      
      
      listStructureStationGrade_1 = listStructureStationGrade;
    
QueryPostGradesListRespDto retData = new QueryPostGradesListRespDto();
  retData.setPostGradesList(listStructureStationGrade_1.stream().map(item -> BeanUtil.toBean(item, PostGradesDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:54496_1
  

  
  
return retData;
  }

    /**
   * D1-3存档岗位类型[1670]
   * gen by moon at 10/2/2022, 12:18:42 AM
   */
  @Trace(operationName = "D1-3存档岗位类型")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ArchiveStationTypeRespDto archiveStationType(ArchiveStationTypeReqDto reqDto){
    
      
      //virtualUsage 1-3-04查询岗位类型详情  2159
      StationType stationType = null;
    QueryStationTypeDetailReq queryStationTypeDetailReq=new QueryStationTypeDetailReq();
  queryStationTypeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56266_1_2159
if(reqDto!=null){
      queryStationTypeDetailReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56255_1_2159
    }
  
    /*1-3-04查询岗位类型详情[141]   */
    Assert.isNull(queryStationTypeDetailReq.getStationTypeId(),"D1-3存档岗位类型-1-3-04查询岗位类型详情-岗位类型ID不能为空",false);
Assert.isNull(queryStationTypeDetailReq.getSubjectLifeCycle(),"D1-3存档岗位类型-1-3-04查询岗位类型详情-主体生命周期不能为空",false);
      stationType = mStationTypeService.queryStationTypeDetail(queryStationTypeDetailReq);
      
      
      
if((stationType!= null&& stationType.getStationTypeId() != null )) {
        //if(1-3-04查询岗位类型详情.岗位类型ID 不等于空 )  2164
        
List<PositionGrade> listPositionGrade =new ArrayList<>();
    QueryPositionGradeListReq queryPositionGradeListReq=new QueryPositionGradeListReq();
  queryPositionGradeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56135_1_2165
if(reqDto!=null){
      queryPositionGradeListReq.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56134_1_2165
    }
  
    /*1-3-03查询职务级别列表[137]   */
    Assert.isNull(queryPositionGradeListReq.getStationTypeId(),"D1-3存档岗位类型-1-3-03查询职务级别列表-岗位类型ID不能为空",false);
Assert.isNull(queryPositionGradeListReq.getSubjectLifeCycle(),"D1-3存档岗位类型-1-3-03查询职务级别列表-主体生命周期不能为空",false);
      listPositionGrade = mPositionGradeService.queryPositionGradeList(queryPositionGradeListReq);
      
      
      
List<GradeScope> listGradeScope =new ArrayList<>();
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  batchQueryGradeScopeListReq.setOrgGradeScopeList(listPositionGrade.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:56138_1_2166
batchQueryGradeScopeListReq.setTypeCode("JOB_LEVEL");//sourceId:56139_1_2166
batchQueryGradeScopeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56140_1_2166
  
    /*1-3-01批量查询等级范围列表（查职级等级范围）[1483]   */
    Assert.isNull(batchQueryGradeScopeListReq.getTypeCode(),"D1-3存档岗位类型-1-3-01批量查询等级范围列表（查职级等级范围）-归属对象类型编码不能为空",false);
Assert.isNull(batchQueryGradeScopeListReq.getSubjectLifeCycle(),"D1-3存档岗位类型-1-3-01批量查询等级范围列表（查职级等级范围）-主体生命周期不能为空",false);
      listGradeScope = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      
           }
boolean bOOLEAN ;
    if(listGradeScope !=null&& listGradeScope.size()>0 ){
          List<GradeScope> listGradeScope_2=new ArrayList<>();
  listGradeScope_2 = //objList-to-objLists
        listGradeScope.stream().map(item -> {
      GradeScope elm = new GradeScope();
      elm.setGradeScopeId(item.getGradeScopeId());//SimpleFieldAssign//sourceId:30658_2_2167
elm.setSubjectLifeCycle("ARCHIVING");//sourceId:30660_2_2167
elm.setIsArchive("TRUE");//sourceId:30667_2_2167
elm.setArchivngType("ARCHIVED");//sourceId:30700_2_2167
if(elm!=null && elm.getSubjectLifeCycle()!=null && elm.getSubjectLifeCycle().equals("ARCHIVING")) {
              elm.setBatchEndTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:30703_2_2167
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56158_1_2167
  
    /*1-3-02批量修改等级范围（存档职级等级范围）[1296]   */
    
      bOOLEAN = mGradeScopeService.batchUpdateGradeScope(listGradeScope_2);
      
      
      
           }
boolean bOOLEAN_1 ;
    if(listPositionGrade !=null&& listPositionGrade.size()>0 ){
          List<PositionGrade> listPositionGrade_2=new ArrayList<>();
  listPositionGrade_2 = //objList-to-objLists
        listPositionGrade.stream().map(item -> {
      PositionGrade elm = new PositionGrade();
      elm.setPositionGradeId(item.getPositionGradeId());//SimpleFieldAssign//sourceId:30677_2_2168
if(elm!=null && elm.getSubjectLifeCycle()!=null && elm.getSubjectLifeCycle().equals("ARCHIVING")) {
              elm.setBatchEndTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:30705_2_2168
elm.setSubjectLifeCycle("ARCHIVING");//sourceId:30682_2_2168
elm.setIsArchive("TRUE");//sourceId:30683_2_2168
elm.setArchivngType("ARCHIVED");//sourceId:30699_2_2168
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56175_1_2168
  
    /*1-3-03批量修改职务级别（存档）[1827]   */
    
      bOOLEAN_1 = mPositionGradeService.batchUpdatePositionGrade(listPositionGrade_2);
      
      
      
           }
List<GradeScope> listGradeScope_3 =new ArrayList<>();
    QueryGradeScopeListReq queryGradeScopeListReq=new QueryGradeScopeListReq();
  queryGradeScopeListReq.setTypeCode("JOB_TYPE");//sourceId:56150_1_2169
queryGradeScopeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56152_1_2169
if(reqDto!=null){
      queryGradeScopeListReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56151_1_2169
    }
  
    /*1-3-01查询等级范围列表（查岗位类型等级范围）[127]   */
    Assert.isNull(queryGradeScopeListReq.getTypeCode(),"D1-3存档岗位类型-1-3-01查询等级范围列表（查岗位类型等级范围）-归属对象类型编码不能为空",false);
Assert.isNull(queryGradeScopeListReq.getEntityId(),"D1-3存档岗位类型-1-3-01查询等级范围列表（查岗位类型等级范围）-归属对象实例ID不能为空",false);
Assert.isNull(queryGradeScopeListReq.getSubjectLifeCycle(),"D1-3存档岗位类型-1-3-01查询等级范围列表（查岗位类型等级范围）-主体生命周期不能为空",false);
      listGradeScope_3 = mGradeScopeService.queryGradeScopeList(queryGradeScopeListReq);
      
      
      
boolean bOOLEAN_2 ;
    if(listGradeScope_3 !=null&& listGradeScope_3.size()>0 ){
          List<GradeScope> listGradeScope_5=new ArrayList<>();
  listGradeScope_5 = //objList-to-objLists
        listGradeScope_3.stream().map(item -> {
      GradeScope elm = new GradeScope();
      elm.setGradeScopeId(item.getGradeScopeId());//SimpleFieldAssign//sourceId:30684_2_2170
elm.setSubjectLifeCycle("ARCHIVING");//sourceId:30686_2_2170
elm.setArchivngType("ARCHIVED");//sourceId:30687_2_2170
elm.setIsArchive("TRUE");//sourceId:30691_2_2170
if(elm!=null && elm.getSubjectLifeCycle()!=null && elm.getSubjectLifeCycle().equals("ARCHIVING")) {
              elm.setBatchEndTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:30702_2_2170
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56176_1_2170
  
    /*1-3-02批量修改等级范围（存档岗位类型等级范围）[1296]   */
    
      bOOLEAN_2 = mGradeScopeService.batchUpdateGradeScope(listGradeScope_5);
      
      
      
           }
Batch batch = null;
    QueryBaseBatchDetailReq queryBaseBatchDetailReq=new QueryBaseBatchDetailReq();
  queryBaseBatchDetailReq.setPurposeTypeCode("STATION_TYPE");//sourceId:56178_1_2171
queryBaseBatchDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56184_1_2171
if(reqDto!=null){
      queryBaseBatchDetailReq.setAscriptionObjectId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56179_1_2171
    }
  
    /*1-1-01查询底层框架服务批次详情[44]   */
    Assert.isNull(queryBaseBatchDetailReq.getPurposeTypeCode(),"D1-3存档岗位类型-1-1-01查询底层框架服务批次详情-用途类型编码不能为空",false);
Assert.isNull(queryBaseBatchDetailReq.getAscriptionObjectId(),"D1-3存档岗位类型-1-1-01查询底层框架服务批次详情-归属对象ID不能为空",false);
Assert.isNull(queryBaseBatchDetailReq.getSubjectLifeCycle(),"D1-3存档岗位类型-1-1-01查询底层框架服务批次详情-主体生命周期不能为空",false);
      batch = mBatchService.queryBaseBatchDetail(queryBaseBatchDetailReq);
      
      
      
boolean bOOLEAN_3 ;
    if(batch !=null){
          Batch batch_2=new Batch();
  if(batch_2!=null && batch_2.getSubjectLifeCycle()!=null && batch_2.getSubjectLifeCycle().equals("ARCHIVING")) {
              batch_2.setBatchEndTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:56224_1_2172
batch_2.setSubjectLifeCycle("ARCHIVING");//sourceId:56225_1_2172
batch_2.setIsArchive("TRUE");//sourceId:56226_1_2172
if(batch!=null){
      batch_2.setBatchId(batch.getBatchId());//SimpleFieldAssign//sourceId:56220_1_2172
    }
  
    /*1-1-01修改底层框架服务批次（存档）[42]   */
    Assert.isNull(batch_2.getBatchId(),"D1-3存档岗位类型-1-1-01修改底层框架服务批次（存档）-批次ID不能为空",false);
Assert.isNull(batch_2.getBatchEndTime(),"D1-3存档岗位类型-1-1-01修改底层框架服务批次（存档）-批次结束时间不能为空",false);
Assert.isNull(batch_2.getSubjectLifeCycle(),"D1-3存档岗位类型-1-1-01修改底层框架服务批次（存档）-主体生命周期不能为空",false);
Assert.isNull(batch_2.getIsArchive(),"D1-3存档岗位类型-1-1-01修改底层框架服务批次（存档）-是否存档不能为空",false);
      bOOLEAN_3 = mBatchService.updateBaseBatch(batch_2);
      
      
      
           }
StatusCheckItem statusCheckItem = null;
    QueryCheckItemStatDetailReq queryCheckItemStatDetailReq=new QueryCheckItemStatDetailReq();
  queryCheckItemStatDetailReq.setObjectTypeCode("STATION_TYPE");//sourceId:56406_1_2177
if(reqDto!=null){
      queryCheckItemStatDetailReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56407_1_2177
    }
  
    /*1-1-22查询状态校验项详情[327]   */
    Assert.isNull(queryCheckItemStatDetailReq.getObjectTypeCode(),"D1-3存档岗位类型-1-1-22查询状态校验项详情-内容对象类型编码不能为空",false);
Assert.isNull(queryCheckItemStatDetailReq.getEntityId(),"D1-3存档岗位类型-1-1-22查询状态校验项详情-内容对象实例ID不能为空",false);
      statusCheckItem = mStatusCheckItemService.queryCheckItemStatDetail(queryCheckItemStatDetailReq);
      
      
      
boolean bOOLEAN_4 ;
    if(statusCheckItem !=null){
          DeleteCheckItemStatReq deleteCheckItemStatReq=new DeleteCheckItemStatReq();
  if(statusCheckItem!=null){
      deleteCheckItemStatReq.setStatusCheckItemId(statusCheckItem.getStatusCheckItemId());//SimpleFieldAssign//sourceId:56420_1_2178
    }
  
    /*1-1-22删除状态校验项[326]   */
    Assert.isNull(deleteCheckItemStatReq.getStatusCheckItemId(),"D1-3存档岗位类型-1-1-22删除状态校验项-状态校验项ID不能为空",false);
      bOOLEAN_4 = mStatusCheckItemService.deleteCheckItemStat(deleteCheckItemStatReq);
      
      
      
           }
AssistBehaviorCurrentStep assistBehaviorCurrentStep = null;
    QueryContCurrentBstepDetailReq queryContCurrentBstepDetailReq=new QueryContCurrentBstepDetailReq();
  queryContCurrentBstepDetailReq.setStepObj("OMS_ORG_STATION_TYPE");//sourceId:56467_1_2190
if(reqDto!=null){
      queryContCurrentBstepDetailReq.setEntityId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56460_1_2190
    }
  
    /*1-1-18查询底层框架服务内容当前行为步骤[1825]   */
    Assert.isNull(queryContCurrentBstepDetailReq.getStepObj(),"D1-3存档岗位类型-1-1-18查询底层框架服务内容当前行为步骤-步骤使用对象表不能为空",false);
Assert.isNull(queryContCurrentBstepDetailReq.getEntityId(),"D1-3存档岗位类型-1-1-18查询底层框架服务内容当前行为步骤-步骤内容实例ID不能为空",false);
      assistBehaviorCurrentStep = mAssistBehaviorCurrentStepService.queryContCurrentBstepDetail(queryContCurrentBstepDetailReq);
      
      
      
boolean bOOLEAN_5 ;
    if(assistBehaviorCurrentStep !=null){
          String string=new String();
  if(assistBehaviorCurrentStep!=null){
      string=assistBehaviorCurrentStep.getBehaviorCurrentStepId();;//SimpleFieldAssign//sourceId:56465_1_2192
    }
  
    /*1-1-18删除底层框架服务内容当前行为步骤	[486]   */
    Assert.isNull(string,"D1-3存档岗位类型-1-1-18删除底层框架服务内容当前行为步骤	-内容当前行为步骤ID不能为空",false);
      bOOLEAN_5 = mAssistBehaviorCurrentStepService.deleteContCurrentBstep(string);
      
      
      
           }
boolean bOOLEAN_6 ;
    StationType stationType_2=new StationType();
  stationType_2.setSubjectLifeCycle("ARCHIVING");//sourceId:56114_1_2193
stationType_2.setIsArchive("TRUE");//sourceId:56115_1_2193
if(reqDto!=null){
      stationType_2.setStationTypeId(reqDto.getStationTypeId());//SimpleFieldAssign//sourceId:56107_1_2193
    }
  
    /*1-3-04修改岗位类型（存档）[139]   */
    Assert.isNull(stationType_2.getStationTypeId(),"D1-3存档岗位类型-1-3-04修改岗位类型（存档）-岗位类型ID不能为空",false);
Assert.isNull(stationType_2.getSubjectLifeCycle(),"D1-3存档岗位类型-1-3-04修改岗位类型（存档）-主体生命周期不能为空",false);
Assert.isNull(stationType_2.getIsArchive(),"D1-3存档岗位类型-1-3-04修改岗位类型（存档）-是否存档不能为空",false);
      bOOLEAN_6 = mStationTypeService.updateStationType(stationType_2);
      
      
      
//processBranchName:正常结束 ,processBranchId:2194
        
      }
else{
       //else  2188
      
//异常结束 2189
      throw new BizException("undefined","undefined",false);
    }
ArchiveStationTypeRespDto retData = new ArchiveStationTypeRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3批量删除等级范围（处理步骤）[1840]
   * gen by moon at 10/2/2022, 1:56:10 AM
   */
  @Trace(operationName = "D1-3批量删除等级范围（处理步骤）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchDeleteGradeScopeAndDeleteStepRespDto batchDeleteGradeScopeAndDeleteStep(BatchDeleteGradeScopeAndDeleteStepReqDto reqDto){
    
      
      //步骤0: 1-3-01批量删除等级范围 - batchDeleteGradeScope
     boolean bOOLEAN ;
    List<String> listString=new ArrayList<>();
  if(reqDto!=null){
      //list-field-assign
    listString=reqDto.getOrgGradeScopeList();;//sourceId:56490_1
    }
  
    /*1-3-01批量删除等级范围[1802]   */
    
      bOOLEAN = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
      
    
//步骤1: 1-1-18修改底层框架服务内容当前行为步骤	 - updateContCurrentBstep
     boolean bOOLEAN_1 ;
    AssistBehaviorCurrentStep assistBehaviorCurrentStep=new AssistBehaviorCurrentStep();
  assistBehaviorCurrentStep.setStepObj("OMS_ORG_STATION_TYPE");//sourceId:56734_1
if(reqDto!=null){
      assistBehaviorCurrentStep.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:56647_1
assistBehaviorCurrentStep.setStepNameId(reqDto.getStepNameId());//SimpleFieldAssign//sourceId:56648_1
    }
  
    /*1-1-18修改底层框架服务内容当前行为步骤	[485]   */
    Assert.isNull(assistBehaviorCurrentStep.getStepObj(),"D1-3批量删除等级范围（处理步骤）-1-1-18修改底层框架服务内容当前行为步骤	-步骤使用对象表不能为空",false);
      bOOLEAN_1 = mAssistBehaviorCurrentStepService.updateContCurrentBstep(assistBehaviorCurrentStep);
      
      
      
    
BatchDeleteGradeScopeAndDeleteStepRespDto retData = new BatchDeleteGradeScopeAndDeleteStepRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-3批量修改职务级别等级范围[1835]
   * gen by moon at 10/2/2022, 1:46:09 AM
   */
  @Trace(operationName = "D1-3批量修改职务级别等级范围")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchUpdatePositionGradeRespDto batchUpdatePositionGrade(BatchUpdatePositionGradeReqDto reqDto){
    
      
      //步骤0: 1-3-01批量查询等级范围列表 - batchQueryGradeScopeList
     List<GradeScope> listGradeScope =new ArrayList<>();
    BatchQueryGradeScopeListReq batchQueryGradeScopeListReq=new BatchQueryGradeScopeListReq();
  batchQueryGradeScopeListReq.setTypeCode("JOB_LEVEL");//sourceId:56378_1
batchQueryGradeScopeListReq.setIsArchive("FALSE");//sourceId:56380_1
if(reqDto!=null){
      batchQueryGradeScopeListReq.setOrgGradeScopeList(reqDto.getOrgGradeScopeList().stream().map(item->item.getEntityId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:56377_1
    }
  
    /*1-3-01批量查询等级范围列表[1483]   */
    Assert.isNull(batchQueryGradeScopeListReq.getTypeCode(),"D1-3批量修改职务级别等级范围-1-3-01批量查询等级范围列表-归属对象类型编码不能为空",false);
Assert.isNull(batchQueryGradeScopeListReq.getIsArchive(),"D1-3批量修改职务级别等级范围-1-3-01批量查询等级范围列表-是否存档不能为空",false);
      listGradeScope = mGradeScopeService.batchQueryGradeScopeList(batchQueryGradeScopeListReq);
      
      
      
    
//步骤1: M-查询岗位类型等级范围数据分类列表（特殊方法） - queryGradeScopeDataClassList
     //ModelCode: dataAucClassification
        QueryGradeScopeDataClassListRespDto dataAucClassificationRes = null;
    if(listGradeScope !=null&& listGradeScope.size()>0 ){
          QueryGradeScopeDataClassListReqDto dataAucClassificationReq=new QueryGradeScopeDataClassListReqDto();
  dataAucClassificationReq.setGradeScopeDataList(listGradeScope.stream().map(item -> BeanUtil.toBean(item, GradeScopeDataDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:56388_1
if(reqDto!=null){
      dataAucClassificationReq.setOrgGradeScopeList(//objList-to-objLists
        reqDto.getOrgGradeScopeList().stream().map(item -> {
      OrgGradeScopeDto elm = new OrgGradeScopeDto();
      if(item!=null){
      elm.setEntityId(item.getEntityId());//SimpleFieldAssign//sourceId:30857_2
elm.setStationGradeId(item.getStationGradeId());//SimpleFieldAssign//sourceId:30855_2
elm.setStationGradeAlias(item.getStationGradeAlias());//SimpleFieldAssign//sourceId:30895_2
elm.setOrderNumber(item.getOrderNumber());//SimpleFieldAssign//sourceId:30858_2
elm.setBatchId(reqDto.getBatchId());//SimpleFieldAssign//sourceId:30859_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:56387_1
    }
  
    /*M-查询岗位类型等级范围数据分类列表（特殊方法）[1800]  入参两个数据集，出参三个数据集，分别对应：新增数据集、删除数据集、存档数据集 */
    
      dataAucClassificationRes = nbPostType.queryGradeScopeDataClassList(dataAucClassificationReq);
      
      
      
           }
    
//步骤2: 1-3-02批量新增等级范围 - batchAddGradeScope
     boolean bOOLEAN ;
    List<GradeScope> listGradeScope_2=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listGradeScope_2 = dataAucClassificationRes.getNewOrgGradeScopeList().stream().map(item -> {
        GradeScope elm =BeanUtil.toBean(item, GradeScope.class);
        elm.setTypeCode("JOB_LEVEL");
        
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56393_1
    }
  
    /*1-3-02批量新增等级范围[1801]   */
    
      bOOLEAN = mGradeScopeService.batchAddGradeScope(listGradeScope_2);
      
      
      
    
//步骤3: 1-3-01批量删除等级范围 - batchDeleteGradeScope
     boolean bOOLEAN_2 ;
    List<String> listString=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listString = dataAucClassificationRes.getDelOrgGradeScopeList().stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:56395_1
    }
  
    /*1-3-01批量删除等级范围[1802]   */
    
      bOOLEAN_2 = mGradeScopeService.batchDeleteGradeScope(listString);
      
      
      
    
//步骤4: 1-3-02批量修改等级范围 - batchUpdateGradeScope
     boolean bOOLEAN_3 ;
    List<GradeScope> listGradeScope_3=new ArrayList<>();
  if(dataAucClassificationRes!=null){
      listGradeScope_3 = dataAucClassificationRes.getArcOrgGradeScopeList().stream().map(item -> {
        GradeScope elm =BeanUtil.toBean(item, GradeScope.class);
        elm.setSubjectLifeCycle("EDITING");
elm.setArchivngType("TOBE_ARCHIVING");
elm.setIsEditing("TRUE");
elm.setIsUpdate("TRUE");
elm.setUpdateStatus("ARCHIVE");
        
        return elm;
      }).collect(Collectors.toList());//objList-to-objLists//sourceId:56392_1
    }
  
    /*1-3-02批量修改等级范围（想存档）[1296]   */
    
      bOOLEAN_3 = mGradeScopeService.batchUpdateGradeScope(listGradeScope_3);
      
      
      
    
BatchUpdatePositionGradeRespDto retData = new BatchUpdatePositionGradeRespDto();
  
  

  
  
return retData;
  }
    //
}
